package actions;

import game.constants.ReferenceAction;
import game.constants.ReferenceSpecialFeature;
import interfaces.ActionInterface;
import interfaces.impl.Action;
import objects.SpetialFeature;
import universe.Universe;
import constants.Constants;



public class ActionObjectFinish extends Action{

	@Override
	public ActionInterface cloneAction() {
		ActionObjectFinish action = new ActionObjectFinish();
		action.modifyAction(this);
		return action;
	}

	@Override
	public boolean processActionChild(Universe universe) {
		System.out.println("puse falsa la construccion1223");
		SpetialFeature isBuilding = target.getFeature(ReferenceSpecialFeature.SPETIAL_FEATURE_IS_BUILDING);
		if(isBuilding==null){
			return false;
		}
		System.out.println("puse falsa la construccion");
		isBuilding.setValue(Constants.FALSE);
		return true;
	}

	@Override
	public void initializeName() {
		name="Action object finish";
		
	}

	@Override
	public void initializeId() {
		id=ReferenceAction.ACTION_OBJECT_FINISH;
		
	}

	@Override
	public void modifyChild(ActionInterface action) {
		
		
	}
	
	

}
